Normalized LCS
object NormalizedLCS : MetricStringDistance, NormalizedStringDistance, NormalizedStringSimilarity(source)
Implements a normalized metric based on the Longest Common Subsequence distance (Yujian & Bo, 2007).
The normalized LCS distance between Strings \(X\) and \(Y\) is: \(\frac{2 \times distance_{LCS}(X, Y)}{\lvert X \rvert + \lvert Y \rvert + distance_{LCS}(X, Y)}\), where \(GLD(X, Y)\) is the non-normalized LCS distance.
The similarity is computed as \(1.0 - distance(X, Y)\).
References
Yujian, L., & Bo, L. (2007-06). A normalized levenshtein distance metric. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(6), 1091-1095. https://doi.org/10.1109/tpami.2007.1078[sci-hub]
Author
solonovamax